<template>
	<view class="classLayout pageBg">
		<custom-nav-bar title="分类"></custom-nav-bar>
		<view class="classify">
			<theme-item v-for="(item,index) in themeList" :key="item._id" :item="item"></theme-item>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		getClassifyApi
	} from '../../api/apis';

	const themeList = ref([])
	const getThemeData = () => {
		getClassifyApi({
			pageSize: 20
		}).then(res => {
			themeList.value = res.data
		})
	}
	getThemeData()
</script>

<style lang="scss" scoped>
	.classify {
		padding: 30rpx;
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 15rpx;
	}
</style>